[QEMU] Add TCP_NODELAY to tcp connections exporting serial ports.
authorPeterJohnston <peter.johnston@xensource.com>
Wed, 22 Nov 2006 16:52:48 +0000 (09:52 -0700)
committerPeterJohnston <peter.johnston@xensource.com>
Wed, 22 Nov 2006 16:52:48 +0000 (09:52 -0700)
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
tools/ioemu/vl.c

index 174ba4b40b3cecfaa794f721280da5c59350f630..7d41a39299d96bc6ef6888f382009a18d1971586 100644 (file)
@@ -2530,6 +2530,7 @@ static CharDriverState *qemu_chr_open_tcp(const char *host_str,
     int is_waitconnect = 1;
     const char *ptr;
     struct sockaddr_in saddr;
+    int opt;
 
     if (parse_host_port(&saddr, host_str) < 0)
         goto fail;
@@ -2598,6 +2599,8 @@ static CharDriverState *qemu_chr_open_tcp(const char *host_str,
             }
         }
         s->fd = fd;
+       opt = 1;
+       setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&opt, sizeof(opt));
         if (s->connected)
             tcp_chr_connect(chr);
         else